package com.qf.boot2202day02.controller;

import com.qf.boot2202day02.dao.UserDao;
import com.qf.boot2202day02.entity.User;
import com.qf.qfsyspringbootstarter.utils.QfFileAppender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/hello")
public class HelloController {


    @GetMapping("/test1")
    public String test1(){
        return "hello";
    }



    @GetMapping("/get/{userid}")
    public User getUser(@PathVariable("userid") Integer userid){
        final User user = new User();
        user.setBirthDay(new Date());
        user.setRegistTime(new Date());
        return user;
    }

    @GetMapping("/export")
    public void export(){
        //1 .查询数据  得到 list<String>


        //2. 向IOC容器要一个新的 FileApperder对象


    }
}
